package com.zy.controller;

import com.zy.pojo.User;
import com.zy.service.UserService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * @author: 11473
 * @time: 2019/9/16 9:38
 */
@Controller
public class UserController {

    @Autowired(required = false)
    private UserService userService;

    @RequestMapping("/selectAge")
    @ResponseBody
    public String selectAge(User user){
        int a = userService.selectAge(user);
        String aa = Integer.toString(a);
        return aa;
    }
}

